cmake_minimum_required(VERSION 3.15)
project(motor_control)

set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)

file(GLOB_RECURSE SOURCE "${CMAKE_CURRENT_LIST_DIR}/src/*.c")

message(STATUS "Source files: ${SOURCE}")

add_executable(motor_control ${SOURCE})

target_include_directories(motor_control PRIVATE ${CMAKE_CURRENT_LIST_DIR}/inc)

target_link_libraries(motor_control PRIVATE -lpthread -lrt)